package pojo;

import java.util.List;

/**
 * @author Wxt
 * @create 2022-02-10 20:48
 */
public class Page<T> {
    public static final Integer PAGE_SIZE = 4;
    private Integer pageNo;
    private Integer pageTotal;
    private Integer pageCount;
    private Integer pageSize = PAGE_SIZE;
    private List<T> pageItems;
    private String url;

    public Page() {
    }

    public Page(Integer pageNo, Integer pageTotal, Integer pageCount, Integer pageSize, List<T> pageItems, String url) {
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.pageCount = pageCount;
        this.pageSize = pageSize;
        this.pageItems = pageItems;
        this.url = url;
    }


    public static Integer getPageSize() {
        return PAGE_SIZE;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getPageItems() {
        return pageItems;
    }

    public void setPageItems(List<T> pageItems) {
        this.pageItems = pageItems;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public Integer getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(Integer pageTotal) {
        this.pageTotal = pageTotal;
    }

    public Integer getPageCount() {
        return pageCount;
    }

    public void setPageCount(Integer pageCount) {
        this.pageCount = pageCount;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "Page{" +
                "pageNo=" + pageNo +
                ", pageTotal=" + pageTotal +
                ", pageCount=" + pageCount +
                ", pageSize=" + pageSize +
                ", pageItems=" + pageItems +
                ", url='" + url + '\'' +
                '}';
    }
}
